import com.pilipili.pojo.Books;
import com.pilipili.service.BookServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class test0 {

@Test
    public void test(){
    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    BookServiceImpl mapper = (BookServiceImpl) context.getBean("BookServiceImpl", BookServiceImpl.class);
    List<Books> books = mapper.selectAllBook();
    for (Books book : books) {
        System.out.println(books);
    }
}
}
